import request from "@/utils/request"
//获取商品列表
export const getProduct = (params: any) => {
    return request({
        url: '/marketers/goods/list',
        method: 'get',
        params: params
    })
}
//获取商品详情
export const getProductDetail = (id: number[]) => {
    return request({
        url: `/marketers/goods/list/${id}`,
        method: 'get'
    })
}
// 新增商品
export const addProduct = (data: any) => {
    return request({
        url: '/marketers/goods/list',
        method: 'post',
        data: data
    })
}
// 删除商品
export const deleteProduct = (ids: any[]) => {
    return request({
        url: `/marketers/goods/${ids}`,
        method: 'delete'
    })
}
//修改商品
export const editProduct = (data: any) => {
    return request({
        url: "/marketers/goods/list",
        method: 'put',
        data: data
    })
}